home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Unix / Shells / zsh / Source / src / config / bz.argh next >
Encoding:
Text File  |  1994-04-07  |  1.1 KB  |  60 lines

  1. # --- (argument handling)
  2.  
  3. eval set X "$_argv"; shift
  4.  
  5. for parm
  6. do
  7.   case "$parm" in
  8.   help)
  9.     . bz.help
  10.     ;;
  11.   *=* ) set Z `echo "$parm"|sed 's/=/ /'`
  12.     var="$2"
  13.     for cp in $CONFIG_PARMS
  14.     do
  15.       if test Z"$cp" = Z"$var"
  16.       then
  17.         cpok=yep
  18.         break
  19.       fi
  20.     done
  21.     if test -z "$cpok"
  22.     then
  23.       echo 'Unrecognized configurable parameter "'$var'" in assignment'
  24.       echo 'Configurable parameters : '$CONFIG_PARMS
  25.       echo 'Try "'$0' help" for more information.'
  26.       echo 'Aborting.'
  27.       exit 1
  28.     fi
  29.     shift
  30.     shift
  31.     eval "C_$var=\"$@\""
  32.     ;;
  33.   hs)
  34.     B_signals_h=yep
  35.     B_config_h=yep
  36.     ;;
  37.   Makefile | makefile | mf)
  38.     B_Makefile=yep
  39.     ;;
  40.   gcc|mediumgcc|strictgcc)
  41.         eval "B_$parm=yep"
  42.     B_gcc=yep
  43.     CC=gcc
  44.     ;;
  45.   signals.h|config.h)
  46.         eval "B_`echo $parm|tr . _`=yep"
  47.     ;;
  48.   ksh|query|probe|auto|noopt|debug|zshdebug|install|nomake)
  49.         eval "B_$parm=yep"
  50.     ;;
  51.   * )    echo 'Unrecognized parameter "'$parm'"'
  52.     echo 'Assignable parameters : '$CONFIG_PARMS
  53.     echo 'Boolean parameters : '$BOOL_PARMS
  54.         echo 'Try "'$0' help" for more information.'
  55.     echo 'Aborting.'
  56.     exit 1
  57.     ;;
  58.   esac
  59. done
  60.